<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <
    <title></title>
    <style type="text/css">
        .box {
            height: 500px;
            background-color: #080808;
            width: 80%;
            margin: auto;
        }
        .box ul {
            list-style: none;
            margin-right: -40px;
            overflow: hidden;
            position: relative;
        }
        .box ul li {
            float: left;
            position: relative;
            height: 400px;
            width: 255px;
            margin-right: 40px;
            margin-top: 50px;
            margin-left: 30px;
        }
        .btn {
            height: 40px;
            line-height: 40px;
            display: block;
            margin: 50px auto;
            width: 180px;
            border: 2px solid rgba(255,255,255, 0.8);
            padding-left: 20px;
            color: #4fc177;
            text-decoration: none;
            background: url("../../images/suc-arrow.png") no-repeat 130px center;
            transition: 0.2s linear;
        }
        .btn:hover{
            background: url("../../images/suc-arrow.png") no-repeat 140px center;
            border: 2px solid rgba(255,255,255, 1);
        }
        .part-box .line {
            position: absolute;
            display: block;
            width: 0px;
            height: 0px;
            transition: 0.2s ease;
            background-color: #fff;
        }
        .part-box img {
            width: 100px;
            height: auto;
            transition: 0.2s linear;
            margin-left: 75px;
        }
        .part-box img:hover {
            transform: rotate(360deg) scale(1.7)
        }
        .btn {
            position: relative;
        }
        .btn .line-top {
            top: -2px;
            left: -110%;
            width: 0px;
            height: 2px;
        }
        .btn:hover .line-top {
            top: -2px;
            left: 0;
            width: 100%;
        }
        .btn .line-right {
            top: -110%;
            right: -2px;
            width: 2px;
            height: 0px;
        }
        .btn:hover .line-right {
            top: -2px;
            height: 100%;
        }
        .btn .line-bottom {
            bottom: -2px;
            right: -110%;
            width: 0;
            height: 2px;
        }
        .btn:hover .line-bottom {
            right: 0px;
            width: 100%;
        }
        .btn .line-left {
            bottom: -110%;
            left: -2px;
            height: 0px;
            width: 2px;
        }
        .btn:hover .line-left {
            height: 100%;
            bottom: -2px;
        }
        .tips {
            position: absolute;
            background-color: #4cae4c;
            color: #ffffff;
            opacity: 0;
            top: 120px;
            padding: 5px;
        }
        .trg {
            position: absolute;
            height: 0;
            width: 0px;
            overflow: hidden;
            border: 7px solid transparent;
            border-top-color: #4cae4c;
            left: 50%;
            bottom: -20px;
            margin-left: -7px;
        }
     /*   .btn:hover + .tips {
            opacity: 1;
            top: 72px;
        }*/
        .tips-content {
            position: relative;
        }
     </style>
</head>
<body>
<div class="container">
    <div class="box">
        <ul>
            <li class="part-box">
                <img src="../../images/prev-img-f.png">
                <a class="btn" href="#" data-title="come to play with us">游戏
                    <span class="line line-top"></span>
                    <span class="line line-bottom"></span>
                    <span class="line line-left"></span>
                    <span class="line line-right"></span>
                </a>
            </li>
            <li class="part-box">
                <img src="../../images/prev-img-f.png">
                <a class="btn" href="#" data-title="learn to use some skills">技能
                    <span class="line line-top"></span>
                    <span class="line line-bottom"></span>
                    <span class="line line-left"></span>
                    <span class="line line-right"></span>
                </a>
            </li>
            <li class="part-box">
                <img src="../../images/prev-img-f.png">
                <a class="btn" href="#" data-title="lets do something together">玩法
                    <span class="line line-top"></span>
                    <span class="line line-bottom"></span>
                    <span class="line line-left"></span>
                    <span class="line line-right"></span>
                </a>
            </li>
        </ul>
        <div class="tips">
            <span class="info">this is my mission</span>
            <span class="trg"></span>
        </div>
    </div>
</div>
<div class="trg-test">
    <div class="tips-content">
        <em>我是提示</em>
        <span class="trg"></span>
    </div>
</div>
<script src="../../js/jquery.min.js"></script>
<script>
    $(".btn").hover(function(){
        var info = $(this).attr("data-title");
        $(".tips .info").text(info);
        var pos = $(this).offset().left;
        var fPos = ($(".tips").outerWidth() - $(this).outerWidth())/2;
        fPos  = pos - fPos;
        $(".tips").css({
            left: fPos
        })
        $(".tips").animate({
            top: "130px",
            opacity: 1
        },300);

    },function(){
        $(".tips").animate({
            top: "120px",
            opacity : 0
        },300);
    })
</script>
</body>
</html>